package com.hsbc.dev.teamo4.sms.sm.po;

import com.hsbc.dev.teamo4.sms.common.base.EntityBean;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;

/**
 * @author:Cady
 * @version:
 * @Project: permission_manage
 * @Package: com.hsbc.dev.teamo4.sms.sm.po
 * @Description:
 * @Date date: 2018-07-27
 */
public class Account extends EntityBean {
    @NotBlank(message = "id  cannot be blank")
    private String id;
    @NotBlank(message = "username  username be blank")
    @Max(16)
    @Min(4)
    private String username;
    @NotBlank(message = "password  password be blank")
    @Max(16)
    @Min(6)
    private String password;

    public Account() {
    }

    public Account(String username, String password) {
        this.username = username;
        this.password = password;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public String toString() {
        return "Account{" +
                "id='" + id + '\'' +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                super.toString()+'\'' +
                '}';
    }
}
